

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>mindspore.numpy.array_equiv &mdash; MindSpore master documentation</title>
  

  
  <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
        <script src="../../_static/jquery.js"></script>
        <script src="../../_static/underscore.js"></script>
        <script src="../../_static/doctools.js"></script>
        <script src="../../_static/language_data.js"></script>
        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    <script type="text/javascript" src="../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="mindspore.numpy.equal" href="mindspore.numpy.equal.html" />
    <link rel="prev" title="mindspore.numpy.array_equal" href="mindspore.numpy.array_equal.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="../../index.html" class="icon icon-home"> MindSpore
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">MindSpore Python API</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../mindspore.html">mindspore</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.common.initializer.html">mindspore.common.initializer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.communication.html">mindspore.communication</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.compression.html">mindspore.compression</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.context.html">mindspore.context</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.html">mindspore.dataset</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.audio.html">mindspore.dataset.audio</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.config.html">mindspore.dataset.config</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.text.html">mindspore.dataset.text</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.transforms.html">mindspore.dataset.transforms</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.vision.html">mindspore.dataset.vision</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.mindrecord.html">mindspore.mindrecord</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.nn.html">mindspore.nn</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.nn.probability.html">mindspore.nn.probability</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.nn.transformer.html">mindspore.nn.transformer</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../mindspore.numpy.html">mindspore.numpy</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../mindspore.numpy.html#array-generation">Array Generation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../mindspore.numpy.html#array-operation">Array Operation</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../mindspore.numpy.html#logic">Logic</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.array_equal.html">mindspore.numpy.array_equal</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">mindspore.numpy.array_equiv</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.equal.html">mindspore.numpy.equal</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.greater.html">mindspore.numpy.greater</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.greater_equal.html">mindspore.numpy.greater_equal</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.in1d.html">mindspore.numpy.in1d</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.isclose.html">mindspore.numpy.isclose</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.isfinite.html">mindspore.numpy.isfinite</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.isin.html">mindspore.numpy.isin</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.isinf.html">mindspore.numpy.isinf</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.isnan.html">mindspore.numpy.isnan</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.isneginf.html">mindspore.numpy.isneginf</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.isposinf.html">mindspore.numpy.isposinf</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.isscalar.html">mindspore.numpy.isscalar</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.less.html">mindspore.numpy.less</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.less_equal.html">mindspore.numpy.less_equal</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.logical_and.html">mindspore.numpy.logical_and</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.logical_not.html">mindspore.numpy.logical_not</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.logical_or.html">mindspore.numpy.logical_or</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.logical_xor.html">mindspore.numpy.logical_xor</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.not_equal.html">mindspore.numpy.not_equal</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.signbit.html">mindspore.numpy.signbit</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.sometrue.html">mindspore.numpy.sometrue</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../mindspore.numpy.html#math">Math</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.ops.html">mindspore.ops</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.parallel.html">mindspore.parallel</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.parallel.nn.html">mindspore.parallel.nn</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.profiler.html">mindspore.profiler</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.scipy.html">mindspore.scipy</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.train.html">mindspore.train</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.boost.html">mindspore.boost</a></li>
</ul>
<p class="caption"><span class="caption-text">MindSpore C++ API</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://www.mindspore.cn/lite/api/zh-CN/master/api_cpp/mindspore.html">MindSpore Lite↗</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../index.html">MindSpore</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
        
          <li><a href="../mindspore.numpy.html">mindspore.numpy</a> &raquo;</li>
        
      <li>mindspore.numpy.array_equiv</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../../_sources/api_python/numpy/mindspore.numpy.array_equiv.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="mindspore-numpy-array-equiv">
<h1>mindspore.numpy.array_equiv<a class="headerlink" href="#mindspore-numpy-array-equiv" title="Permalink to this headline">¶</a></h1>
<dl class="function">
<dt id="mindspore.numpy.array_equiv">
<code class="sig-prename descclassname">mindspore.numpy.</code><code class="sig-name descname">array_equiv</code><span class="sig-paren">(</span><em class="sig-param">a1</em>, <em class="sig-param">a2</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/mindspore/numpy/logic_ops.html#array_equiv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mindspore.numpy.array_equiv" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <cite>True</cite> if input arrays are shape consistent and all elements equal.</p>
<p>Shape consistent means they are either the same shape, or one input array can
be broadcasted to create the same shape as the other one.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>In mindspore, a bool tensor is returned instead, since in Graph mode, the
value cannot be traced and computed at compile time.</p>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>a1/a2</strong> (<em>Union</em><em>[</em><a class="reference external" href="https://docs.python.org/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a><em>, </em><a class="reference external" href="https://docs.python.org/library/functions.html#float" title="(in Python v3.8)"><em>float</em></a><em>, </em><a class="reference external" href="https://docs.python.org/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a><em>, </em><a class="reference external" href="https://docs.python.org/library/stdtypes.html#list" title="(in Python v3.8)"><em>list</em></a><em>, </em><a class="reference external" href="https://docs.python.org/library/stdtypes.html#tuple" title="(in Python v3.8)"><em>tuple</em></a><em>, </em><a class="reference internal" href="../mindspore/mindspore.Tensor.html#mindspore.Tensor" title="mindspore.Tensor"><em>Tensor</em></a><em>]</em>) – Input arrays.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Scalar bool tensor, value is <cite>True</cite> if inputs are equivalent, <cite>False</cite> otherwise.</p>
</dd>
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/library/exceptions.html#TypeError" title="(in Python v3.8)"><strong>TypeError</strong></a> – If inputs have types not specified above.</p>
</dd>
</dl>
<dl class="simple">
<dt>Supported Platforms:</dt><dd><p><code class="docutils literal notranslate"><span class="pre">Ascend</span></code> <code class="docutils literal notranslate"><span class="pre">GPU</span></code> <code class="docutils literal notranslate"><span class="pre">CPU</span></code></p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">mindspore.numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">a</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">b</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">]]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">array_equiv</span><span class="p">(</span><span class="n">a</span><span class="p">,</span><span class="n">b</span><span class="p">))</span>
<span class="go">True</span>
</pre></div>
</div>
</dd></dl>

</div>


           </div>
           
          </div>
          <footer>
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
        <a href="mindspore.numpy.equal.html" class="btn btn-neutral float-right" title="mindspore.numpy.equal" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
        <a href="mindspore.numpy.array_equal.html" class="btn btn-neutral float-left" title="mindspore.numpy.array_equal" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2021, MindSpore.

    </p>
  </div>
    
    
    
    Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    
    provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>